Skip to content

Add the from method to parse from any Iterator#62

Merged
TeXitoi merged 2 commits into
TeXitoi:masterfrom
Kerollmops:master
Feb 10, 2018
Merged

Add the from method to parse from any Iterator#62
TeXitoi merged 2 commits into
TeXitoi:masterfrom
Kerollmops:master

Conversation

@Kerollmops

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread src/lib.rs Outdated
/// Gets the struct from any iterator such as a `Vec` of your making.
/// Print the error message and quit the program in case of failure.
fn from_any<I, T>(iter: I) -> Self where
Self: Sized, I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fn from_iter<I>(iter: I) -> Self
where
    Self: Sized,
    I: IntoIterator,
    I::Item: Into<OsString> + Clone
{
    //...

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was not really about indentation, but about the name of the method and the useless generic.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ho ! I will update that, sorry, didn't see.

@Kerollmops Kerollmops Feb 10, 2018

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done! Thanks for spotting this, didn't think about specializing the I::Item !

@TeXitoi

TeXitoi commented Feb 10, 2018

Copy link
Copy Markdown
Owner

Thanks for the contribution !

You can update the change log. I'll do it a bit later if you don't have the time.

@TeXitoi TeXitoi merged commit 28bee51 into TeXitoi:master Feb 10, 2018
@TeXitoi

TeXitoi commented Feb 10, 2018

Copy link
Copy Markdown
Owner

Pups, bad review :-( you didn't change the name to from_iter. I'll modify it later.

@CAD97 CAD97 mentioned this pull request Feb 17, 2018
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants